set(BIN_NAME qt_test)

set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTOUIC ON)

find_package(Qt5Core REQUIRED)
find_package(Qt5Gui REQUIRED)
find_package(Qt5Widgets REQUIRED)
find_package(Qt5Network REQUIRED)
find_package(PkgConfig REQUIRED)
pkg_check_modules(QGSettings REQUIRED gsettings-qt)
add_executable(${BIN_NAME} main.cpp)
target_link_libraries(${BIN_NAME} Qt5::Core Qt5::Gui Qt5::Widgets Qt5::Network ${QGSettings_LIBRARIES})

target_include_directories(${BIN_NAME} PUBLIC
    ${QGSettings_INCLUDE_DIRS})
